Page({
  data: {
    is_buy: 0,//查看购买记录
    is_give: 0,//查看未赠送
  },
  //加载刷新
  loadRefresh: function () {
    var _tath = this;
    getApp().request({
      url: getApp().api.cardshop.index,
      data: {},
      success: function (t) {
        console.log(t, '#################');
        _tath.setData({
          banner_list: t.data.banner_list,
          card_voucher_list: t.data.card_voucher_list,
          is_buy: t.data.is_buy,//查看购买记录
          is_give: t.data.is_give,//查看未赠送
        });
      },
      complete: function () { }
    });
  },
  onLoad: function (t) {
    this.loadRefresh();
    getApp().page.onLoad(this, t);
  },
  onReady: function () { },
  onShow: function () {
    getApp().page.onShow(this);
    
  },
  onHide: function () {
  },
  onPullDownRefresh:function(t){
    this.loadRefresh();
    getApp().page.onLoad(this, t);
    setTimeout(res=>{
      wx.stopPullDownRefresh()
    },1500)
  },
  onUnload: function () {
  }
});